import request from '@/utils/request'

// 查询ZxOrder列表
export function listZxOrder(query) {
  return request({
    url: '/api/v1/zxorderList',
    method: 'get',
    params: query
  })
}

// 查询ZxOrder详细
export function getZxOrder(id) {
  return request({
    url: '/api/v1/zxorder/' + id,
    method: 'get'
  })
}

// 新增ZxOrder
export function addZxOrder(data) {
  data.decorateBudget = data.decorateBudget * 100
  data.designPrice = data.designPrice * 100
  data.buildCost = data.buildCost * 100
  return request({
    url: '/api/v1/zxorder',
    method: 'post',
    data: data
  })
}

// 修改ZxOrder
export function updateZxOrder(data) {
  var d = {}
  d = JSON.parse(JSON.stringify(data))
  d.decorateBudget = data.decorateBudget * 100
  d.designPrice = data.designPrice * 100
  d.buildCost = data.buildCost * 100
  return request({
    url: '/api/v1/zxorder',
    method: 'put',
    data: d
  })
}

// 删除ZxOrder
export function delZxOrder(id) {
  return request({
    url: '/api/v1/zxorder/' + id,
    method: 'delete'
  })
}

